package com.unionpay.mpds.model;

// default package

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

/**
 * Model entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "T_MODEL", uniqueConstraints = @UniqueConstraint(columnNames = "MODEL_INDEX"))
public class Model implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = 5002382604829867801L;
	private String factoryId;
	private String modelId;
	private String modelIndex;
	private String modelName;
	private String modelType;
	private String modelStatus;
	private String modelRemark;
	private String modelHumidity;
	private String modelTemperature;
	private String modelWeight;
	private String modelVolume;
	private String modelVoltage;
	private String modelPlatform;
	private Integer modelService;
	private String modelCertificate;
	private String modelComm;
	private String modelCpu;
	private String modelScreen;
	private String modelMemory;
	private String modelPrinterspd;
	private String modelPrinter;
	private String modelPinpad;

	// Constructors

	/** default constructor */
	public Model() {
	}

	/** minimal constructor */
	public Model(String factoryId, String modelId, String modelIndex,
			String modelName, String modelType, String modelStatus) {
		this.factoryId = factoryId;
		this.modelId = modelId;
		this.modelIndex = modelIndex;
		this.modelName = modelName;
		this.modelType = modelType;
		this.modelStatus = modelStatus;
	}

	/** full constructor */
	public Model(String factoryId, String modelId, String modelIndex,
			String modelName, String modelType, String modelStatus,
			String modelRemark, String modelHumidity, String modelTemperature,
			String modelWeight, String modelVolume, String modelVoltage,
			String modelPlatform, Integer modelService,
			String modelCertificate, String modelComm, String modelCpu,
			String modelScreen, String modelMemory, String modelPrinterspd,
			String modelPrinter, String modelPinpad) {
		this.factoryId = factoryId;
		this.modelId = modelId;
		this.modelIndex = modelIndex;
		this.modelName = modelName;
		this.modelType = modelType;
		this.modelStatus = modelStatus;
		this.modelRemark = modelRemark;
		this.modelHumidity = modelHumidity;
		this.modelTemperature = modelTemperature;
		this.modelWeight = modelWeight;
		this.modelVolume = modelVolume;
		this.modelVoltage = modelVoltage;
		this.modelPlatform = modelPlatform;
		this.modelService = modelService;
		this.modelCertificate = modelCertificate;
		this.modelComm = modelComm;
		this.modelCpu = modelCpu;
		this.modelScreen = modelScreen;
		this.modelMemory = modelMemory;
		this.modelPrinterspd = modelPrinterspd;
		this.modelPrinter = modelPrinter;
		this.modelPinpad = modelPinpad;
	}

	// Property accessors

	@Column(name = "FACTORY_ID", nullable = false, length = 3)
	public String getFactoryId() {
		return this.factoryId;
	}

	public void setFactoryId(String factoryId) {
		this.factoryId = factoryId;
	}

	@Id
	@Column(name = "MODEL_ID", nullable = false, length = 3)
	public String getModelId() {
		return this.modelId;
	}

	public void setModelId(String modelId) {
		this.modelId = modelId;
	}

	@Column(name = "MODEL_INDEX", unique = true, nullable = false, length = 40)
	public String getModelIndex() {
		return this.modelIndex;
	}

	public void setModelIndex(String modelIndex) {
		this.modelIndex = modelIndex;
	}

	@Column(name = "MODEL_NAME", nullable = false, length = 40)
	public String getModelName() {
		return this.modelName;
	}

	public void setModelName(String modelName) {
		this.modelName = modelName;
	}

	@Column(name = "MODEL_TYPE", nullable = false, length = 1)
	public String getModelType() {
		return this.modelType;
	}

	public void setModelType(String modelType) {
		this.modelType = modelType;
	}

	@Column(name = "MODEL_STATUS", nullable = false, length = 1)
	public String getModelStatus() {
		return this.modelStatus;
	}

	public void setModelStatus(String modelStatus) {
		this.modelStatus = modelStatus;
	}

	@Column(name = "MODEL_REMARK", length = 100)
	public String getModelRemark() {
		return this.modelRemark;
	}

	public void setModelRemark(String modelRemark) {
		this.modelRemark = modelRemark;
	}

	@Column(name = "MODEL_HUMIDITY", length = 20)
	public String getModelHumidity() {
		return this.modelHumidity;
	}

	public void setModelHumidity(String modelHumidity) {
		this.modelHumidity = modelHumidity;
	}

	@Column(name = "MODEL_TEMPERATURE", length = 20)
	public String getModelTemperature() {
		return this.modelTemperature;
	}

	public void setModelTemperature(String modelTemperature) {
		this.modelTemperature = modelTemperature;
	}

	@Column(name = "MODEL_WEIGHT", length = 20)
	public String getModelWeight() {
		return this.modelWeight;
	}

	public void setModelWeight(String modelWeight) {
		this.modelWeight = modelWeight;
	}

	@Column(name = "MODEL_VOLUME", length = 40)
	public String getModelVolume() {
		return this.modelVolume;
	}

	public void setModelVolume(String modelVolume) {
		this.modelVolume = modelVolume;
	}

	@Column(name = "MODEL_VOLTAGE", length = 1)
	public String getModelVoltage() {
		return this.modelVoltage;
	}

	public void setModelVoltage(String modelVoltage) {
		this.modelVoltage = modelVoltage;
	}

	@Column(name = "MODEL_PLATFORM", length = 1)
	public String getModelPlatform() {
		return this.modelPlatform;
	}

	public void setModelPlatform(String modelPlatform) {
		this.modelPlatform = modelPlatform;
	}

	@Column(name = "MODEL_SERVICE")
	public Integer getModelService() {
		return this.modelService;
	}

	public void setModelService(Integer modelService) {
		this.modelService = modelService;
	}

	@Column(name = "MODEL_CERTIFICATE", length = 80)
	public String getModelCertificate() {
		return this.modelCertificate;
	}

	public void setModelCertificate(String modelCertificate) {
		this.modelCertificate = modelCertificate;
	}

	@Column(name = "MODEL_COMM", length = 40)
	public String getModelComm() {
		return this.modelComm;
	}

	public void setModelComm(String modelComm) {
		this.modelComm = modelComm;
	}

	@Column(name = "MODEL_CPU", length = 40)
	public String getModelCpu() {
		return this.modelCpu;
	}

	public void setModelCpu(String modelCpu) {
		this.modelCpu = modelCpu;
	}

	@Column(name = "MODEL_SCREEN", length = 40)
	public String getModelScreen() {
		return this.modelScreen;
	}

	public void setModelScreen(String modelScreen) {
		this.modelScreen = modelScreen;
	}

	@Column(name = "MODEL_MEMORY", length = 40)
	public String getModelMemory() {
		return this.modelMemory;
	}

	public void setModelMemory(String modelMemory) {
		this.modelMemory = modelMemory;
	}

	@Column(name = "MODEL_PRINTERSPD", length = 20)
	public String getModelPrinterspd() {
		return this.modelPrinterspd;
	}

	public void setModelPrinterspd(String modelPrinterspd) {
		this.modelPrinterspd = modelPrinterspd;
	}

	@Column(name = "MODEL_PRINTER", length = 1)
	public String getModelPrinter() {
		return this.modelPrinter;
	}

	public void setModelPrinter(String modelPrinter) {
		this.modelPrinter = modelPrinter;
	}

	@Column(name = "MODEL_PINPAD", length = 1)
	public String getModelPinpad() {
		return this.modelPinpad;
	}

	public void setModelPinpad(String modelPinpad) {
		this.modelPinpad = modelPinpad;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof Model))
			return false;
		Model castOther = (Model) other;

		return ((this.getFactoryId() == castOther.getFactoryId()) || (this
				.getFactoryId() != null && castOther.getFactoryId() != null && this
				.getFactoryId().equals(castOther.getFactoryId())))
				&& ((this.getModelId() == castOther.getModelId()) || (this
						.getModelId() != null && castOther.getModelId() != null && this
						.getModelId().equals(castOther.getModelId())))
				&& ((this.getModelIndex() == castOther.getModelIndex()) || (this
						.getModelIndex() != null
						&& castOther.getModelIndex() != null && this
						.getModelIndex().equals(castOther.getModelIndex())))
				&& ((this.getModelName() == castOther.getModelName()) || (this
						.getModelName() != null
						&& castOther.getModelName() != null && this
						.getModelName().equals(castOther.getModelName())))
				&& ((this.getModelType() == castOther.getModelType()) || (this
						.getModelType() != null
						&& castOther.getModelType() != null && this
						.getModelType().equals(castOther.getModelType())))
				&& ((this.getModelStatus() == castOther.getModelStatus()) || (this
						.getModelStatus() != null
						&& castOther.getModelStatus() != null && this
						.getModelStatus().equals(castOther.getModelStatus())))
				&& ((this.getModelRemark() == castOther.getModelRemark()) || (this
						.getModelRemark() != null
						&& castOther.getModelRemark() != null && this
						.getModelRemark().equals(castOther.getModelRemark())))
				&& ((this.getModelHumidity() == castOther.getModelHumidity()) || (this
						.getModelHumidity() != null
						&& castOther.getModelHumidity() != null && this
						.getModelHumidity()
						.equals(castOther.getModelHumidity())))
				&& ((this.getModelTemperature() == castOther
						.getModelTemperature()) || (this.getModelTemperature() != null
						&& castOther.getModelTemperature() != null && this
						.getModelTemperature().equals(
								castOther.getModelTemperature())))
				&& ((this.getModelWeight() == castOther.getModelWeight()) || (this
						.getModelWeight() != null
						&& castOther.getModelWeight() != null && this
						.getModelWeight().equals(castOther.getModelWeight())))
				&& ((this.getModelVolume() == castOther.getModelVolume()) || (this
						.getModelVolume() != null
						&& castOther.getModelVolume() != null && this
						.getModelVolume().equals(castOther.getModelVolume())))
				&& ((this.getModelVoltage() == castOther.getModelVoltage()) || (this
						.getModelVoltage() != null
						&& castOther.getModelVoltage() != null && this
						.getModelVoltage().equals(castOther.getModelVoltage())))
				&& ((this.getModelPlatform() == castOther.getModelPlatform()) || (this
						.getModelPlatform() != null
						&& castOther.getModelPlatform() != null && this
						.getModelPlatform()
						.equals(castOther.getModelPlatform())))
				&& ((this.getModelService() == castOther.getModelService()) || (this
						.getModelService() != null
						&& castOther.getModelService() != null && this
						.getModelService().equals(castOther.getModelService())))
				&& ((this.getModelCertificate() == castOther
						.getModelCertificate()) || (this.getModelCertificate() != null
						&& castOther.getModelCertificate() != null && this
						.getModelCertificate().equals(
								castOther.getModelCertificate())))
				&& ((this.getModelComm() == castOther.getModelComm()) || (this
						.getModelComm() != null
						&& castOther.getModelComm() != null && this
						.getModelComm().equals(castOther.getModelComm())))
				&& ((this.getModelCpu() == castOther.getModelCpu()) || (this
						.getModelCpu() != null
						&& castOther.getModelCpu() != null && this
						.getModelCpu().equals(castOther.getModelCpu())))
				&& ((this.getModelScreen() == castOther.getModelScreen()) || (this
						.getModelScreen() != null
						&& castOther.getModelScreen() != null && this
						.getModelScreen().equals(castOther.getModelScreen())))
				&& ((this.getModelMemory() == castOther.getModelMemory()) || (this
						.getModelMemory() != null
						&& castOther.getModelMemory() != null && this
						.getModelMemory().equals(castOther.getModelMemory())))
				&& ((this.getModelPrinterspd() == castOther
						.getModelPrinterspd()) || (this.getModelPrinterspd() != null
						&& castOther.getModelPrinterspd() != null && this
						.getModelPrinterspd().equals(
								castOther.getModelPrinterspd())))
				&& ((this.getModelPrinter() == castOther.getModelPrinter()) || (this
						.getModelPrinter() != null
						&& castOther.getModelPrinter() != null && this
						.getModelPrinter().equals(castOther.getModelPrinter())))
				&& ((this.getModelPinpad() == castOther.getModelPinpad()) || (this
						.getModelPinpad() != null
						&& castOther.getModelPinpad() != null && this
						.getModelPinpad().equals(castOther.getModelPinpad())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getFactoryId() == null ? 0 : this.getFactoryId().hashCode());
		result = 37 * result
				+ (getModelId() == null ? 0 : this.getModelId().hashCode());
		result = 37
				* result
				+ (getModelIndex() == null ? 0 : this.getModelIndex()
						.hashCode());
		result = 37 * result
				+ (getModelName() == null ? 0 : this.getModelName().hashCode());
		result = 37 * result
				+ (getModelType() == null ? 0 : this.getModelType().hashCode());
		result = 37
				* result
				+ (getModelStatus() == null ? 0 : this.getModelStatus()
						.hashCode());
		result = 37
				* result
				+ (getModelRemark() == null ? 0 : this.getModelRemark()
						.hashCode());
		result = 37
				* result
				+ (getModelHumidity() == null ? 0 : this.getModelHumidity()
						.hashCode());
		result = 37
				* result
				+ (getModelTemperature() == null ? 0 : this
						.getModelTemperature().hashCode());
		result = 37
				* result
				+ (getModelWeight() == null ? 0 : this.getModelWeight()
						.hashCode());
		result = 37
				* result
				+ (getModelVolume() == null ? 0 : this.getModelVolume()
						.hashCode());
		result = 37
				* result
				+ (getModelVoltage() == null ? 0 : this.getModelVoltage()
						.hashCode());
		result = 37
				* result
				+ (getModelPlatform() == null ? 0 : this.getModelPlatform()
						.hashCode());
		result = 37
				* result
				+ (getModelService() == null ? 0 : this.getModelService()
						.hashCode());
		result = 37
				* result
				+ (getModelCertificate() == null ? 0 : this
						.getModelCertificate().hashCode());
		result = 37 * result
				+ (getModelComm() == null ? 0 : this.getModelComm().hashCode());
		result = 37 * result
				+ (getModelCpu() == null ? 0 : this.getModelCpu().hashCode());
		result = 37
				* result
				+ (getModelScreen() == null ? 0 : this.getModelScreen()
						.hashCode());
		result = 37
				* result
				+ (getModelMemory() == null ? 0 : this.getModelMemory()
						.hashCode());
		result = 37
				* result
				+ (getModelPrinterspd() == null ? 0 : this.getModelPrinterspd()
						.hashCode());
		result = 37
				* result
				+ (getModelPrinter() == null ? 0 : this.getModelPrinter()
						.hashCode());
		result = 37
				* result
				+ (getModelPinpad() == null ? 0 : this.getModelPinpad()
						.hashCode());
		return result;
	}

}